﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Windows.Forms;

public class BaseDAO
{
    public BaseDAO()
    { 
    
    }
    public SqlConnection ConnectionData()
    {
        SqlConnection connection = new SqlConnection("Data Source=.;Initial Catalog=SM;Integrated Security=True");
        try
        {
            connection.Open();
        }
        catch (Exception)
        {
            MessageBox.Show("Error: Lỗi khi kết nối với Cơ sở dữ liệu.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
        }
        return connection;
    }
}
